package com.knight.thread;

public class ThreadLocalTest {

	private ThreadLocal<Integer> t = new ThreadLocal<>();
	
	private ThreadLocal<Integer> t2 = new ThreadLocal<>();
	
	
	public void add() {
		t.set(1);
		t2.set(2);
	}
	
	public void get() {
		System.out.println(t.get());
		System.out.println(t2.get());
	}
	
	
	public static void main(String[] args) {
		ThreadLocalTest test = new ThreadLocalTest();
		test.add();
		
		test.get();
	}
}
